package com.imooc;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.jasypt.encryption.StringEncryptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @Author: 顾志杰
 * @Date: 2019/11/13
 * @Time: 9:31
 */
/*exclude = {SecurityAutoConfiguration.class} 排除security自动装配*/
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
/*扫描 mybatis 通用 mapper 所在的包*/
@MapperScan(basePackages = "com.imooc.mapper")
/*扫描所有包以及组件包*/
@ComponentScan(basePackages = {"com.imooc","org.n3r.idworker"})
/*开启使用redis作为spring session*/
@EnableRedisHttpSession
@EnableEncryptableProperties
//@EnableScheduling
public class Application {

    @Autowired
    private StringEncryptor stringEncryptor;


    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
//        stringEncryptor.encrypt("加密串");
    }
}
